#ifndef CAMERA_H
#define CAMERA_H

#include <app/ameTypes.h>
#include <app/modules/Ainput.h>

#include <glm/glm.hpp>

class Camera {
    
public:
    
    Camera ( glm::vec3 position, double fieldOfView, double aspect, double zNear, double zFar );
    
    void setPosition ( glm::vec3 position );
    void setCameraTarget ( glm::vec3 target );
    void setCameraTarget ( Amouse* );

    void setFieldOfView ( double FOV );
    void setAspect ( double aspect );
    void setNearClipping ( double zNear );
    void setFarClipping ( double zFar );
    

    glm::vec3 getPosition ();
    glm::vec3 getCameraTarget ();

    double getFieldOfView ();
    double getAspect ();
    double getNearClipping ();
    double getFarClipping ();
    
    void applyChanges ();
    
    glm::mat4 getViewProjection ();
    
private:
    
    glm::mat4 mProjection;
    glm::mat4 mView;
    glm::vec3 mPosition;
    glm::vec3 mDirection;
    glm::vec3 mForward;
    glm::vec3 mRight;
    glm::vec3 mUp;
    
    double fieldOfView;
    double aspect;
    double zNear;
    double zFar;

    double yaw, pitch; //for mouse direction
};

#endif
